<!--
 * @Author: CHINAKAIYUAN<sunkaiyuan@namenode.cn>
 * @Date: 2022-02-03 14:41:20
 * @LastEditTime: 2023-11-07 15:24:50
 * @LastEditors: 孙开源 && sunkaiyuan@namenode.cn
 * @Description:   :gridOps="gridOptions" 
-->
<template>
	<sc-VxeTable ref="xGrid1" :gridEvts="gridEvents" :tablecode="'storageoutsource_finance'"
		:url="this.$API.purchase.storage.list" :params="[{ instorage_way_id: { type: 'in', value: [3] } }]">
	</sc-VxeTable>
	<save v-if="dialog.save" ref="save" @success="handleSuccess" @closed="dialog.save = false">
	</save>
</template>
<script>
import save from "./save";
export default {
	name: "storageActionoutsource_finance",
	components: {
		save,
	},
	data() {
		return {
			dialog: {
				save: false,
			},
			gridEvents: {
				cellDblclick: ({ row }) => {
					this.save(row);
				},
			},
		};
	},
	methods: {
		handleSuccess() {
			this.$refs.xGrid1.refresh();
		},
		save(selected) {
			this.dialog.save = true;
			this.$nextTick(() => {
				this.$refs.save.open("edit").setData(selected);
			});
		},
	},
};
</script>
